<?php if (!defined("_ECRIRE_INC_VERSION")) return;
/**
 * Aloha Cart
 *
 * @author     Aleksey Yaroshchuk (aleksey.yaroshchuk@gmail.com)
 * @license    GNU/GPL
 * @package    plugins
 * @subpackage alohacart
 * @copyright  (c) Aleksey Yaroshchuk 2011-2012
 * @link       http://www.spip-contrib.net/AlohaCart
 */
 
    function alohacart_insert_head($flux) {
        // First of all insert language script:
        if (!$lang_src = find_in_path('lang/alohacart_'.$GLOBALS['spip_lang'].'.js'))
            $lang_src = find_in_path('lang/alohacart_'.$GLOBALS['meta']['langue_site'].'.js');
        $flux .= "<script language='JavaScript' type='text/javascript' src='".$lang_src."'></script>\n";
        
        $flux .= "<script language='JavaScript' type='text/javascript' src='".find_in_path('js/jquery.json-2.2.min.js')."'></script>\n";
        $flux .= "<script language='JavaScript' type='text/javascript' src='".find_in_path('js/alohacart.php')."'></script>\n";
               
        return $flux;
    }
?>